-
Notifications
You must be signed in to change notification settings - Fork 20
zephyr-build: add aux_display support and fixed the gpio interrupt for stm32 series. #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The zephyr-build DTS parser fails on Windows, due to the "\r\n" whitespace used on that platform. Accept the "\r" in addition to the "\n" to allow it to parse successfully. Fixes: zephyrproject-rtos#68 See: zephyrproject-rtos#68 Signed-off-by: coskun ergan <[email protected]>
…r stm32 series. The zephyr-build parser was missing aux_display support, which was included and used in a demo; https://github.com/coskunergan/zephyr_rust_demo Signed-off-by: coskun ergan <[email protected]>
@@ -76,6 +76,7 @@ fn main() -> Result<()> { | |||
.derive_copy(false) | |||
.allowlist_function("k_.*") | |||
.allowlist_function("gpio_.*") | |||
.allowlist_function("auxdisplay_.*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your editor seems to be inserting tabs instead of spaces. It does seem to suggest that cargo fmt doesn't process the build.rs file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from that, does auxdisplay have anything to do with this PR?
@@ -31,7 +31,7 @@ mod async_io { | |||
use embassy_sync::waitqueue::AtomicWaker; | |||
use zephyr_sys::{ | |||
device, gpio_add_callback, gpio_callback, gpio_init_callback, gpio_pin_interrupt_configure, | |||
gpio_pin_interrupt_configure_dt, gpio_port_pins_t, GPIO_INT_LEVEL_HIGH, GPIO_INT_LEVEL_LOW, | |||
gpio_pin_interrupt_configure_dt, gpio_port_pins_t, GPIO_INT_EDGE_FALLING, GPIO_INT_EDGE_RISING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although the STM32 devices do not have level triggered interrupts, we don't want to remove support for them from targets that do. The async interface is actually really racy with edge triggered interrupts, and will pretty readily end up missing an edge and not firing again.
Honestly, I think supporting wake from stm32 is going to be a bit more work. We can't just have something attach an edge trigger, but would need to leave it attached, to track the state.
The zephyr-build parser was missing aux_display support, which was included and used in a demo;
https://github.com/coskunergan/zephyr_rust_demo